/*
 */
package org.hook.showcase.concurrent;

import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;

/**
 * @author suwuqiang 2011-12-5
 */
@ThreadSafe
public class SafeSequence implements Sequence {
	@GuardedBy("this")
	private int value;

	public synchronized int getNext() {
		value = value + 1;
		System.out.println("value:" + value);
		return value;
	}
}
